<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String contextPath = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+contextPath+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
        
   <style type="text/css">

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}


</style>
<script type="text/javascript">
function gofun(_link) {
    window.top.frames('mainFrame').location.href=_link;

 }

</script>
<link href="<%=contextPath%>/img/skin/skin.css" rel="stylesheet" type="text/css" />
		<link href="<%=contextPath%>/css/sic.css" rel="stylesheet" type="text/css" />
 
    
    <script type="text/javascript">
function validate() {
if (policeID == "") {
alert("请输入用户名!!!");
form.Username.focus();
return false;
}
if (policepw == "") {
alert("请输入密码!!!");
form.Username.focus();
return false;
}
if (policepw!=policepw_new) {
alert("两次输入的密码不一致!!!");
return false;
}
}
</SCRIPT>
    
    <title>My JSP 'password_modify.jsp' starting page</title>
  </head>
  <%
  String flag = (String)request.getParameter("flag");
  if(flag!=null&&flag.equals("success"))
  {
  %>  <h2>修改密码成功</h2><br/>
  	<a href="police/bei_an.jsp">进入备案界面</a><br/>
  	<a href="police/index.jsp">重新登陆</a>
  <%
  }else if(flag!=null&&flag.equals("erro"))
  {
  %>  <h2>您输入的原始密码不对</h2><%
  }
   %>

  <body>
	
		
  
  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=contextPath%>/img/skin/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">密码修改</div></td>

      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=contextPath%>/img/skin/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"  class="table_boder">
     <table width="100%" height="450" border="0" cellpadding="0" cellspacing="0">
		
	<tr><td valign="top" align="center">
 	<form method="post" action="servlet/IsLogin"  onsubmit= "return validate() ">  
		<table class="table_boder" cellpadding="0" cellspacing="0">
    <tr><td align="right" >
			警号：</td>
			<td>
			<input type="text" readonly="readonly" name="policeID" value="<%=session.getAttribute("policeID") %>">
			</td>
			<tr>
			<td align="right" >
			
			原始密码：</td>
			<td>
			<input type="password" name="policepw" property="policepw">
			</td>
			</tr>
			<tr><td align="right">
			新密码：</td>
			<td>
			<input type="password" name="policepw_new">
			</td></tr>
			<!-- TODO 用js校验两次输入的新密码是否一致 -->
			<tr><td align="right">
			再次输入新密码：</td>
			<td>
			<input type="password" >
			</td></tr>
			<tr><td colspan="2" align="center">
			<input type = "hidden" name = "flag" value = "mod_pwd">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="submit" value="提交"  onClick="return validate();">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="reset">
			</td></tr>
		</form>
		</tr></table>
						</td></tr></table>
	</td>
    <td background="<%=contextPath%>/img/skin/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=contextPath%>/img/skin/buttom_bgs.gif"><img src="<%=contextPath%>/img/skin/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
		  </body>
</html>
